use rjvm_class_path::class_file_packet::ClassFilePacket;
use rjvm_class_path::class_path::{ClassPath};

#[test]
fn create_class_path_test() {
    let jdk_lib_path = "C:/Software/jdk-11.0.11+9/jmods".to_string();
    let cp = "C:/Users/sunjr/.m2/repository/org/projectlombok/lombok/1.18.12/lombok-1.18.12.jar \
    C:/Users/sunjr/.m2/repository/com/qinghotel/qinghotel-user-api/1.53.0-SNAPSHOT/qinghotel-user-api-1.53.0-SNAPSHOT.jar \
    C:/Code/rjvm/rjvm_class_path/target".to_string();
    let class_path = ClassPath::new(&jdk_lib_path, &cp).unwrap();
    println!("{}", class_path.boot_classpath.to_string());
    println!("{}", class_path.user_classpath.to_string());
    let result = class_path.read_class(&String::from("java/lang/Object"));
    match result {
        Ok(_data) => {
            println!("OK")
        }
        Err(message) => {
            println!("{}", message)
        }
    }
}